package chapter10;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2018-03-20 下午5:28
 */
public class TestDemo {
    private static final Logger LOGGER = LoggerFactory.getLogger(TestDemo.class);

    public static void main(String[] args) {
        Book book1 = new Book("java", 66.1);
        Book book2 = null  ;
        try {
            book2 = (Book) book1.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        if (book2!=null) {
            book2.setTitle("jsp");

            LOGGER.info("book1:{}", book1.getTitle());
            LOGGER.info("book2:{}", book2.getTitle());
        }
    }
}
